#pragma once
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#define Status int
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
#define STACK_INIT_SIZE 30
#define STACKINCREMENT 20

typedef struct Literal
{
	int num;	 // 编号
	int state; // 状态
	struct Literal *next;
} Literal, *LinkLiteral;

typedef struct Clause
{
	int state;		 // 状态
	LinkLiteral L; // 文字链表的头指针
	struct Clause *next;
} Clause, *LinkClause;

typedef struct ClauseStack
{
	LinkClause *base;
	LinkClause *top;
	int stacksize;
} ClauseStack;

typedef struct LiteralStack
{
	LinkLiteral *base;
	LinkLiteral *top;
	int stacksize;
} LiteralStack;

typedef struct LiteralInfo
{
	// 1存在，0不存在
	int state;
	// 真值 1为真，0为假，2表示不确定
	int value;
	int count;
} LiteralInfo;

int n, m;
int _cnt = 0;
LiteralInfo *Llinfo = NULL;
int zcxShudu[10][10];